<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="therapyList.title"/></title>
    <meta name="heading" content="<fmt:message key='therapyList.heading'/>"/>
    <meta name="menu" content="TherapyMenu"/>
</head>

<c:set var="buttons">
    <input type="button" onclick="location.href='<c:url value="/mainMenu.html"/>'"
        value="<fmt:message key="button.done"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false"/>

<display:table name="therapyList" cellspacing="0" cellpadding="0" requestURI=""
    id="therapyList" pagesize="15" class="table personList" export="false">

    <display:column property="dateStr" escapeXml="true" sortable="true"
        url="/therapyform.html" paramId="id" paramProperty="id" titleKey="therapy.tdate"/>
    <display:column property="patient.name" escapeXml="true" sortable="true" titleKey="user.name"/>
    <display:column sortable="true" titleKey="therapy.notify">
    		<c:choose>
       		<c:when test="${therapyList.notify}">
    			<fmt:message key="therapy.notified"/>
    		</c:when>
    		<c:otherwise>
    			<fmt:message key="therapy.unnotified"/>
    		</c:otherwise>
    	</c:choose>
    </display:column>   
    <display:column property="dosage" escapeXml="true" sortable="true" titleKey="therapy.dosage"/>
    <display:column property="synptom" escapeXml="true" sortable="false" titleKey="therapy.synptom"/>

    <display:setProperty name="paging.banner.item_name" value="therapy"/>
    <display:setProperty name="paging.banner.items_name" value="therapies"/>

</display:table>

<c:out value="${buttons}" escapeXml="false"/>

<script type="text/javascript">
    highlightTableRows("therapyList");
</script>